﻿<T:ViewBase
 x:Class="WPFExcelReport.VWVKP"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
 xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
    xmlns:UserControls="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Controls"
    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
     xmlns:me="clr-namespace:WPFExcelReport"
    xmlns:MU="clr-namespace:WPFExcelReport;assembly=TABAUFM" 
       xmlns:GD="clr-namespace:WPFExcelReport;assembly=TGAAUF"  
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"   
    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"    
    Name="TV"
    Background="White"
 >
    <T:ViewBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=SetMaster.VKPOS}"/>
        <CollectionViewSource  x:Key="vwABPOS" Source="{Binding Path=SetDetail.ICC_ABAX}" />
        <CollectionViewSource  x:Key="vwXGASTGA" Source="{Binding Path=SetEnv.GASTGA}" />
    </T:ViewBase.Resources>
    <Grid  Margin="0,0,0,0" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="1*" />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel>
                <TextBlock Width="Auto">销售单:</TextBlock>
                <ex:TXT72    MaxLength="2" Width="40" Margin="10,0,0,0"  Text="{Binding KRS,ElementName=TV}" HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper"/>
                <ex:TXT72 PRE="000000"  IsAutoClear="True"  MaxLength="6" Width="80" Margin="0,0,0,0"   Text="{Binding LFD,ElementName=TV}" HorizontalAlignment="Left" KeyDown="txtVKPAUFLFD_KeyUp"/>
                <ex:TXT72 PRE="000" MaxLength="3"   Width="60" Margin="0,0,0,0" Text="{Binding POS,ElementName=TV}" HorizontalAlignment="Left" Background="Yellow" KeyboardNavigation.TabIndex="0" />
                <Button   Height="20"  Width="20" Margin="10,0,0,0" Name="btnGetVKKOPF" Click="btnQuery_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <TextBlock Text="查询"></TextBlock>
                <Button   Height="20"  Width="20" Margin="10,0,0,0"   Click="btnFlipPlanned_Click" KeyboardNavigation.TabIndex="3"  >
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Convert.png" />
                    </Button.Background>
                </Button>
                <TextBlock Name="lblPlanned" Text="待排产"></TextBlock>
                <TextBlock Grid.Column="0" Text="预计划" Margin="20,0,0,0"></TextBlock>
                <Button Grid.Column="1" Height="20"  Width="20" Margin="0,0,0,0" Visibility="{Binding IsPlan, Converter={StaticResource ResourceKey=bv}}" Click="btnPrePlan_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Refresh.png" />

                    </Button.Background>
                </Button>
                <TextBlock Grid.Column="0" Text="补单" Margin="20,0,0,0"></TextBlock>
                <Button Grid.Column="1" Height="20"  Width="20" Margin="0,0,0,0" Click="btnCompensation_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Add.png" />
                    </Button.Background>
                </Button>
                <TextBox Name="txtAddedQty" Visibility="Collapsed" Width="100" Foreground="Red" >0</TextBox>
            </WrapPanel>
            <WrapPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="强力" Margin="0,0,0,0"></TextBlock>
                    <TextBlock Grid.Column="1"  Name="txtVKRemark" Height="20" ScrollViewer.CanContentScroll="True"  Foreground="Red"
                   Text="{Binding STRENGTH, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=gb2312}}"   Margin="0,0,0,-0.4"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="捻度" Margin="0,0,0,0"></TextBlock>
                    <TextBlock Grid.Column="1"   Height="20" ScrollViewer.CanContentScroll="True"   Foreground="Red"
                   Text="{Binding TWIST, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=gb2312}}" Grid.ColumnSpan="2" Margin="0,0,0,-0.4"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="纱型" Margin="0,0,0,0"></TextBlock>
                    <TextBlock Grid.Column="1"   Height="20" ScrollViewer.CanContentScroll="True"   Foreground="Red"
                   Text="{Binding YARNTYP, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=gb2312}}"  Margin="0,0,0,-0.4"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="对色标准" Margin="0,0,0,0"></TextBlock>
                    <TextBlock Grid.Column="1"   Height="20" ScrollViewer.CanContentScroll="True"   Foreground="Red"
                   Text="{Binding COLORSTD, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=gb2312}}"  Margin="0,0,0,-0.4"/>
                </Grid>
            </WrapPanel>
        </StackPanel>
        <Grid  Grid.Row="1" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
            <DataGrid Grid.Row="0"
                        FontSize="12"
                              AutoGenerateColumns="False"
                              Name="dlgVKP"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKPOS}}"  
                              HeadersVisibility="Column" 
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=VKPAUFPOS}" Header="POS"   Width="Auto"  MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=YARNTYP, Converter={StaticResource ResourceKey=gb2312}}" Header="纱型"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="色号"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMENGE1, Converter={StaticResource ResourceKey=d100}}" Header="数量" Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPZUGET, Converter={StaticResource ResourceKey=d100}}" Header="留位" Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=VKPRESERV, Converter={StaticResource ResourceKey=d100}}" Header="预留" Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="交期"  Width="Auto" MinWidth="40"/>
                </DataGrid.Columns>
            </DataGrid>
            <Border Grid.Row="1"  
                BorderBrush="DarkGray" BorderThickness=".0,.0,2,2" CornerRadius="11"  >
                <Border BorderBrush="White" BorderThickness="5" CornerRadius="8" >
                    <Border BorderBrush="Black" BorderThickness="1.5" CornerRadius="8">
                        <MU:TVKMU EXAUF="{Binding KEY,ElementName=TV}"/>
                    </Border>
                </Border>
            </Border>
        </Grid>
        <Grid Grid.Row="1" Grid.RowSpan="2" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
                <WrapPanel>
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="重置参数"></TextBlock>
                        <Button  Grid.Column="1" Height="20"  Width="20" Margin="0,0,0,0"   IsEnabled="True" VerticalAlignment="Top" Click="btnResetP_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="/ImagePackage;component/Images/Reload.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=交期}}"></TextBlock>
                        <TextBox Grid.Column="1"   Text="{Binding Path=VKPLIEFTERM, Source={StaticResource ResourceKey=vwVKPOS}}" Width="Auto"></TextBox>
                    </Grid>
                </WrapPanel>
                <WrapPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=订单kg}}"></TextBlock>
                        <TextBox Grid.Column="1" Name="txtSQTYEND"  Text="{Binding Path=SQTYEND}" Width="120"></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="40"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="交货范围%"></TextBlock>
                        <TextBox Grid.Column="1" Text="0" Name="txtSR01" KeyDown="TextBox_KeyDown" Height="20" VerticalAlignment="Top"></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="80"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="可用成品数量"></TextBlock>
                        <TextBox Grid.Column="1" Name="txtSTOCK" KeyDown="TextBox_KeyDown"  Text="{Binding Path=PREALLOCATED, Source={StaticResource ResourceKey=vwVKPOS}}" Width="60"></TextBox>
                    </Grid>
                </WrapPanel>

                <WrapPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=批号}}"></TextBlock>
                        <TextBox Grid.Column="1" Name="txtSABACOLORREF"  MaxLength="10"  Width="120"></TextBox>
                    </Grid>
                </WrapPanel>
            </StackPanel>
            <StackPanel  Grid.Row="2" Grid.Column="0" Name="ZoneTwist" Margin="5,0,0,0">
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition   Height="Auto"/>
                    </Grid.RowDefinitions>
                    <WrapPanel  Grid.Row="0">
                        <TextBlock Text="并线:"></TextBlock>
                        <TextBlock Name="txtTAUF" Width="80" Foreground="Red"></TextBlock>
                    </WrapPanel>
                    <ComboBox Grid.Row="1" Name="cmbTwistFlow" Width="80"  HorizontalAlignment="Left" />
                </Grid>
                <Grid Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="并线交期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtDDT"   HorizontalAlignment="Stretch"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="开始日期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtDST"  Width="Auto" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="周期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtLDT"  Text="7" Width="Auto" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="并线kg"></TextBlock>
                    <TextBox Grid.Column="1" Name="txtTQTYEND" KeyDown="TextBox_KeyDown"  HorizontalAlignment="Left" Width="Auto" ></TextBox>
                </Grid>
                <Grid Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="损耗"></TextBlock>
                    <TextBox Grid.Column="1" Text="0" Name="txtTR01" KeyDown="TextBox_KeyDown"  Width="Auto" HorizontalAlignment="Left" ></TextBox>
                </Grid>
            </StackPanel>
            <StackPanel  Grid.Row="2" Grid.Column="1" Name="ZoneSpin"    Margin="5,0,0,0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition   Height="Auto"/>
                    </Grid.RowDefinitions>

                    <WrapPanel  Grid.Row="0">
                        <TextBlock Text="细纱:"/>
                        <TextBlock x:Name="txtXAUF" Width="Auto" Foreground="Red"/>
                    </WrapPanel>
                    <ComboBox Grid.Row="1" Name="cmbSpinningFlow" Width="100"   HorizontalAlignment="Left">
                    </ComboBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="细纱kg"></TextBlock>
                    <TextBox Grid.Column="1"   Name="txtXQTYEND"  KeyDown="TextBox_KeyDown"  Width="Auto" HorizontalAlignment="Left" ></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="细纱交期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtDDX"  Width="Auto" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="开始日期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtDSX"  Width="Auto" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="周期"></TextBlock>
                    <TextBox Grid.Column="1" Text="1" Name="txtLDX" Width="Auto" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="台日产"></TextBlock>
                    <TextBox Grid.Column="1" Text="0" Name="txtXMDP" Width="60" HorizontalAlignment="Left"  KeyDown="TextBox_KeyDown" ></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="细纱机台"></TextBlock>
                    <TextBox Grid.Column="1" Text="1" Name="txtXMNUM" Width="60" HorizontalAlignment="Left"  KeyDown="TextBox_KeyDown" ></TextBox>
                </Grid>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="粗纱加成kg"></TextBlock>
                    <TextBox Grid.Column="1" Text="0" Name="txtXF01" HorizontalAlignment="Left" KeyDown="TextBox_KeyDown"  Width="40" Height="18" Margin="23.6,0,23.6,-0.4" VerticalAlignment="Top"></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="粗纱损耗%"></TextBlock>
                    <TextBox Grid.Column="1" Text="0" Name="txtXR01" HorizontalAlignment="Left" KeyDown="TextBox_KeyDown"  Width="30" ></TextBox>
                </Grid>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="梳理方式"></TextBlock>
                    <ComboBox Grid.Column="1" Name="cmbCombingType"  Width="80" HorizontalAlignment="Left">
                        <ComboBoxItem Content="普梳" Tag="P"></ComboBoxItem>
                        <ComboBoxItem Content="精梳" Tag="J"></ComboBoxItem>
                    </ComboBox>
                </Grid>
            </StackPanel>
            <StackPanel  Grid.Row="2" Grid.Column="2" Name="ZoneRoving" Margin="5,0,0,0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition   Height="Auto"/>
                    </Grid.RowDefinitions>
                    <WrapPanel  Grid.Row="0">
                        <TextBlock Text="粗纱:"></TextBlock>
                        <TextBlock Name="txtRAUF" Width="80" Foreground="Red"></TextBlock>
                    </WrapPanel>
                    <ComboBox Grid.Row="1" Name="cmbRolvingFlow" Width="100"  HorizontalAlignment="Left">
                    </ComboBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="粗纱kg"></TextBlock>
                    <TextBox Grid.Column="1"   Name="txtRQTYEND"  KeyDown="TextBox_KeyDown"  Width="Auto" HorizontalAlignment="Left" ></TextBox>
                </Grid>
                <Grid Visibility="Collapsed">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition   Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Text="粗纱交期"></TextBlock>
                    <TextBox Grid.Row="1"  Name="txtDDR"  Width="100" HorizontalAlignment="Left"></TextBox>
                </Grid>
                <Grid>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="下单日期"></TextBlock>
                    <TextBox Grid.Column="1"  Name="txtDSR"  Width="Auto" HorizontalAlignment="Left"  KeyDown="TextBox_KeyDown" ></TextBox>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="12.2"></ColumnDefinition>
                        <ColumnDefinition Width="47.8"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="周期" Margin="0,0,0,-0.2" Grid.ColumnSpan="2"></TextBlock>
                    <TextBox Grid.Column="2" Text="7" Name="txtLDR" Width="Auto" HorizontalAlignment="Left"  KeyDown="TextBox_KeyDown"  Margin="0,0,0,-0.2" />
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="投料%"></TextBlock>
                    <TextBlock Grid.Column="1" Text="0" Name="txtRR01" KeyDown="TextBox_KeyDown"  Width="60" HorizontalAlignment="Left"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="原料重量"></TextBlock>
                    <TextBlock Grid.Column="1" Text="0" Name="txtRQTYMAT" KeyDown="TextBox_KeyDown"  Width="60" HorizontalAlignment="Left"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="定量"></TextBlock>
                    <ComboBox Grid.Column="1" Name="cmbTopsMakeUp"  Width="80" HorizontalAlignment="Left">
                    </ComboBox>
                </Grid>
                <DataGrid  
                          AutoGenerateColumns="False" EnableRowVirtualization="True" 
                    Name="dlgXGS08"
                          HeadersVisibility="Column"  
                          FontSize="12" 
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwXGASTGA}}"    
                         HorizontalAlignment="Stretch" 
                          ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto" 
                          >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=GAGGFARBE,Converter={StaticResource ResourceKey=Trim}}" Header="AB纱" Width="Auto" MinWidth="40" />
                        <DataGridTextColumn  Binding="{Binding Path=GAGANTEIL,Converter={StaticResource ResourceKey=d1000}}" Header="比例" Width="Auto" MinWidth="60" />
                    </DataGrid.Columns>
                </DataGrid>
                <GD:TGD713AB
                    EXAUF="{Binding ABAUF,ElementName=TV}"
                    /> 
            </StackPanel>
            <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Visibility="Collapsed"
                          AutoGenerateColumns="False" EnableRowVirtualization="True"
                              Name="dlgABP"
                          HeadersVisibility="Column"  
                          FontSize="12" 
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"    
                         HorizontalAlignment="Stretch" 
                          ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto" 
                          >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFKRS}" Header="生产单" Width="Auto" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFLFD}" Header="" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFPOS}" Header="" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAART}" Header="纱线" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAVAR}" Header="版本" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAFARBE}" Header="色号" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn  Binding="{Binding Path=QTYEND}" Header="KG成品" Width="Auto" MinWidth="60" />
                    <DataGridTextColumn  Binding="{Binding Path=QTYMAT}" Header="KG原料" Width="Auto" MinWidth="60" />
                    <DataGridTextColumn  Binding="{Binding Path=ABARESMG,Converter={StaticResource ResourceKey=d1000}}" Header="KG原料" Width="Auto" MinWidth="60" />
                    <DataGridTextColumn  Binding="{Binding Path=ABAQTYRESERVE,Converter={StaticResource ResourceKey=d1000}}" Header="KG原料" Width="Auto" MinWidth="60" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFMSL}" Header="定量" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=UNITQTY}" Header="台日产" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=UNITNUM}" Header="台数" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAVKENDD}" Header="完成" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAVKSTARTD}" Header="开始" Width="Auto" MinWidth="40" />
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
    </Grid>
</T:ViewBase>
